/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dosideas.restlet.resource;

import com.dosideas.restlet.domain.Persona;
import java.util.ArrayList;
import java.util.Collection;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;

/**
 *
 * @author Emiliano
 */
public class PersonasResource extends ServerResource {

    @Get
    @Produces(MediaType.APPLICATION_JSON)
    public Collection<Persona> buscar() {
        Collection<Persona> personas = new ArrayList<Persona>();
        Persona persona = new Persona(33, "bart simpson");
        personas.add(persona);

        persona = new Persona(34, "sapo pepe");
        personas.add(persona);

        return personas;
    }
}
